﻿using jutehui.Model;
using MyShop.Service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MyShop.Controllers
{
    public class ShareController : Controller
    {
        //
        // GET: /Share/
        public ActionResult Index()
        {
            return View();
        }
        public ActionResult product(string url, string title, string prisour, string imgurl)
        {
            //if (string.IsNullOrEmpty(url) || string.IsNullOrEmpty(imgurl))
            //{
            //    Response.Redirect("Index");
            //    return View();
            //}
            ViewBag.url = url;
            ViewBag.title = title;
            ViewBag.prisour = prisour;
            ViewBag.imgurl = imgurl;
            return View();
        }
        public ActionResult detailpro(int pid)
        {
            //if (string.IsNullOrEmpty(url) || string.IsNullOrEmpty(imgurl))
            //{
            //    Response.Redirect("Index");
            //    return View();
            //}
            MainService ms = new MainService();
            var item = ms.GetProduct(pid);
            return View(item);
        }
    }
}